package cn.hanxiaojun.imple;

import java.sql.SQLException;

import cn.common.tool.dele;
import cn.hanxiaojun.model.Desk;

public class UpDate {
	
  	     
	 public int UpdateBoard(Desk desk) throws SQLException {
		 
		 
		 String sql="update desk set t_name = "+"'"+desk.getT_name()+"',"+
				     "t_status = "+"'"+desk.getT_status()+"',"+
				     "t_time = "+"'"+desk.getT_time()+"',"+
				     "t_type = "+"'"+desk.getT_type()+"'"+
				      "where t_id = "+"'"+desk.getT_id()+"'";
		System.out.println("这是进行更改时的sql语句"+sql);
		 
		dele up = new dele();
		int number = up.dele(sql);
		if(number==1){
			return 1;
		}else{
			return 0;
		}
		
   }
}
